<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>文本编辑器</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>
    <link href="http://cdn.quilljs.com/1.0.0/quill.snow.css" rel="stylesheet">
    <script src="http://cdn.quilljs.com/1.0.0/quill.js"></script>

    <scripttype="text/javascript" src="https://cdn.jsdelivr.net/npm/wangeditor@latest/dist/wangEditor.min.js"></script>

    <style>
      .ql-snow .ql-picker.ql-size .ql-picker-label::before {
        content: '中字体';
      }
      .ql-toolbar.ql-snow .ql-formats {
        margin-right: 8px;
      }

      #editor {
        min-height: 300px;
      }
    </style>
  </head>
  <body>
    <!-- 创建工具栏组件 -->

    <!-- 创建文本编辑器 -->
   <textarea id="editor"></textarea>
    <script type="text/javascript">
      const E = window.wangEditor
      const editor = new E("#editor")
      // 或者 const editor = new E(document.getElementById('div1'))
      editor.create()
    </script>

   
  </body>
</html>